﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Ivy.SiteAdmin.IBusinessLogic;
using Ivy.SiteAdmin.BusinessLogic;
using Ivy.SiteAdmin.Entity;

using Ivy.Common.Framework.GeneralUtility;

namespace DasIdeen.Pages
{
    public partial class SiteAdminListSubscriptionRequests : System.Web.UI.Page
    {
        #region  Variable & constant
        #endregion  Variable & constant

        #region Constructor & Destructor
        #endregion Constructor & Destructor

        #region Properties
        #endregion Properties

        #region Public Methods
        #endregion Public Methods

        #region Events
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadSubscriptionList();
            }
        }
        #endregion Events

        #region Private Methods
        private void CheckUserAutherization()
        {
        }

        private void ClearScreen()
        {
        }

        private void InitializeScreen()
        {
            ClearScreen();
            FillLoadLookUpData();
        }

        private void FillLoadLookUpData()
        {
        }

        private void TranslateEntityToUIControls()
        {
        }

        private void TranslateUIControlsToEntity()
        {
        }

        private void LoadSubscriptionList()
        {
            try
            {
                List<SubscriptionMaster> lSubscriptionList = new List<SubscriptionMaster>();
                SiteAdminBus lSiteAdminBus = new SiteAdminBus();
                lSubscriptionList = lSiteAdminBus.GetAllSubscription();
                if (lSubscriptionList.Count > 0)
                {
                    this.gdvSubscriptionRequestList.DataSource = lSubscriptionList;
                    this.gdvSubscriptionRequestList.DataBind();
                }
                else
                {
                    this.lblMessage.Text = "No Records Found..!";
                }
                
            }
            catch (Exception ex)
            {
                ExceptionUtility.ExceptionHandler(ex, Server.MapPath("~/"));
            }
        }

        protected void gdvSubscriptionRequestList_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            this.gdvSubscriptionRequestList.PageIndex = e.NewPageIndex;
            LoadSubscriptionList();
        }
        #endregion Private Methods

        
    }
}